import request from '@/utils/request'

// 查询楼盘信息列表
export function listBuilding(query) {
    return request({
        url: '/tb/building/list',
        method: 'get',
        params: query
    })
}

// 查询楼盘信息详细
export function getBuilding(id) {
    return request({
        url: '/tb/building/' + id,
        method: 'get'
    })
}

// 新增楼盘信息
export function addBuilding(data) {
    return request({
        url: '/tb/building',
        method: 'post',
        data: data
    })
}

// 修改楼盘信息
export function updateBuilding(data) {
    return request({
        url: '/tb/building',
        method: 'put',
        data: data
    })
}

// 删除楼盘信息
export function delBuilding(id) {
    return request({
        url: '/tb/building/' + id,
        method: 'delete'
    })
}

// 根据楼盘名称模糊搜索
export function getBuildingByName(query) {
    return request({
        url: '/tb/building/queryBuildingIndo',
        method: 'get',
        params: query
    })
}
